package com.atom.test.view

import android.graphics.BitmapFactory
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.otaliastudios.zoom.ZoomImageView

class ViewZoomActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_zoom)
        val image = resources.assets.open("banner/liuyifei1.jpg")
        val zoomImageView = findViewById<ZoomImageView>(R.id.zoomImageView)
        zoomImageView.setMinZoom(0.3f)
        zoomImageView.setMaxZoom(1.3f)
        zoomImageView.realZoomTo( 0.5f , false)
        zoomImageView.setImageBitmap(BitmapFactory.decodeStream(image))
    }
}